<%-- 
    Document   : ChargeValidationProcess
    Created on : Apr 1, 2012, 5:27:53 PM
    Author     : Tokino
--%>


<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@ page language="java" %>
<%@ page import="java.util.*" %>
<%!
%>



<jsp:useBean id="formChargeValidate" class="servlets.ChargeValidate" scope="request">
    <jsp:setProperty name="formChargeValidate" property="*"/>
</jsp:useBean>  
<jsp:useBean id="SecprogScopeSession" class=
             "servlets.SecprogScopeSession" scope="session" />

<%


    if (!SecprogScopeSession.getIsLogin()) {
        response.sendRedirect("../index.jsp");
    }
    if (SecprogScopeSession.getAccounttype() == 10) {
        response.sendRedirect("../admin/AMain.jsp");
    }
    if (SecprogScopeSession.getAccounttype() == 2) {
        response.sendRedirect("../accounting/PCMain.jsp");
    }
    if (SecprogScopeSession.getAccounttype() == 3 || SecprogScopeSession.getAccounttype() == 4 || SecprogScopeSession.getAccounttype() == 5 || SecprogScopeSession.getAccounttype() == 6) {
        response.sendRedirect("../product/PMain.jsp");
    }
        formChargeValidate.setUsername(SecprogScopeSession.getUserName());
        formChargeValidate.setAccounttype(SecprogScopeSession.getAccounttype());
    if (formChargeValidate.checkcreditinfo()) {

%>
<jsp:forward page="ChargeDelivery.jsp"/>
<%} else {
%>
<jsp:forward page="ChargeDelivery.jsp"/>
<%    }
%>
